home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-15 | 2.5 KB | 109 lines | [TEXT/CWIE] |
- // ===========================================================================
- // Ctest.cp
- // ===========================================================================
- //
- #include <LGrowZone.h>
- #include <LWindow.h>
- #include <PP_Messages.h>
- #include <PP_Resources.h>
- #include <PPobClasses.h>
- #include <UDrawingState.h>
- #include <UMemoryMgr.h>
- #include <URegistrar.h>
- #include <LDialogBox.h>
-
- #include "Ctest.h"
- #include "COffScreenPicture.h"
-
-
- // ===========================================================================
- // Main Program
- // ===========================================================================
-
- void main(void){
- // Set Debugging options
- SetDebugThrow_(debugAction_Alert);
- SetDebugSignal_(debugAction_Alert);
-
- InitializeHeap(3); // Initialize Memory Manager
- // Parameter is number of Master Pointer
- // blocks to allocate
-
- // Initialize standard Toolbox managers
- UQDGlobals::InitializeToolbox(&qd);
-
- new LGrowZone(20000); // Install a GrowZone function to catch
- // low memory situations.
-
- Ctest theApp;
- theApp.Run();
- }
-
-
- // ---------------------------------------------------------------------------
- // Constructor
- // ---------------------------------------------------------------------------
-
- Ctest::Ctest(void){
- RegisterAllPPClasses();
- RegisterClass_(COffScreenPicture);
-
- LDialogBox::CreateWindow(1000, this);
- }
-
-
- // ---------------------------------------------------------------------------
- // Destructor
- // ---------------------------------------------------------------------------
-
- Ctest::~Ctest(void){
- }
-
-
- #pragma mark -
-
-
- // ---------------------------------------------------------------------------
- // ObeyCommand
- // ---------------------------------------------------------------------------
-
- Boolean Ctest::ObeyCommand(CommandT inCommand, void *ioParam){
- Boolean cmdHandled = true;
-
- switch(inCommand){
- case cmd_About:
- break;
-
- default:
- cmdHandled = LApplication::ObeyCommand(inCommand, ioParam);
- break;
- }
-
- return cmdHandled;
- }
-
-
- // ---------------------------------------------------------------------------
- // FindCommandStatus
- // ---------------------------------------------------------------------------
-
- void Ctest::FindCommandStatus(
- CommandT inCommand,
- Boolean &outEnabled,
- Boolean &outUsesMark,
- Char16 &outMark,
- Str255 outName){
-
- switch(inCommand){
- case cmd_About:
- case cmd_Quit:
- outEnabled = true;
- break;
-
- default:
- LApplication::FindCommandStatus(inCommand, outEnabled,
- outUsesMark, outMark, outName);
- break;
- }
- }
-